# Maintainer: David Runge <dvzrv@archlinux.org>

_name=sphinx_lv2_theme
pkgname=python-sphinx-lv2-theme
pkgver=1.2.2
pkgrel=2
pkgdesc="A minimal static theme for Sphinx"
arch=(any)
url="https://gitlab.com/lv2/sphinx_lv2_theme"
license=(ISC)
depends=(python-sphinx)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha256sums=('775ffdfccf7df1e743f6cf9e8c57fa8668c23e2b7afaa2171771eb70289c82ea')
b2sums=('9e1b17dc75b26e815f1480cd84d998a97bd38d9fc0aa97dde8049849d7ba8252160530b10d5576bd95e83afb0ee508f7711f72fcf58a6e90b2339842c432ee6d')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 {NEWS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
}
